﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Delphi.Mimir.Data.Entities.Raw.Mappings {
    public class RawEpsGrowthEstimateMap : EntityTypeConfiguration<RawGrowthEstimate> {
        public RawEpsGrowthEstimateMap() {
            /******************************************************************
            /* Table
            /*****************************************************************/
            ToTable("raw.eod_eps_growth_estimates");

            /******************************************************************
            /* Primary Key
            /*****************************************************************/
            HasKey(a => a.age_id);

            /******************************************************************
            /* Index
            /*****************************************************************/
            // None

            /******************************************************************
            /* Relationships
            /*****************************************************************/
            // None

            /******************************************************************
            /* Properties
            /*****************************************************************/
            Property(a => a.age_id)
                .IsRequired()
                .HasColumnName("age_id");

            Property(a => a.age_sym_cd)
                .IsRequired()
                .IsUnicode(false)
                .HasMaxLength(25)
                .HasColumnName("age_sym_cd");

            Property(a => a.age_exc_cd)
                .IsRequired()
                .IsUnicode(false)
                .HasMaxLength(25)
                .HasColumnName("age_exc_cd");

            Property(a => a.age_dt)
                .IsRequired()
                .HasColumnName("age_dt");

            Property(a => a.age_comp_typ)
                .IsRequired()
                .IsUnicode(false)
                .HasMaxLength(25)
                .HasColumnName("age_comp_typ");

            Property(a => a.age_curt_qtr)
                .IsOptional()
                .HasPrecision(18, 6)
                .HasColumnName("age_curt_qtr");

            Property(a => a.age_next_qtr)
                .IsOptional()
                .HasPrecision(18, 6)
                .HasColumnName("age_next_qtr");

            Property(a => a.age_curt_year)
                .IsOptional()
                .HasPrecision(18, 6)
                .HasColumnName("age_curt_year");

            Property(a => a.age_next_year)
                .IsOptional()
                .HasPrecision(18, 6)
                .HasColumnName("age_next_year");

            Property(a => a.age_past_5y)
                .IsOptional()
                .HasPrecision(18, 6)
                .HasColumnName("age_past_5y");

            Property(a => a.age_next_5y)
                .IsOptional()
                .HasPrecision(18, 6)
                .HasColumnName("age_next_5y");

            Property(a => a.age_pe)
                .IsOptional()
                .HasPrecision(18, 6)
                .HasColumnName("age_pe");

            Property(a => a.age_peg)
                .IsOptional()
                .HasPrecision(18, 6)
                .HasColumnName("age_peg");
        }
    }
}
